package com.chengjian.woaini;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
import org.springframework.context.annotation.Bean;
import org.springframework.remoting.caucho.HessianProxyFactoryBean;

@EnableEurekaServer
@SpringBootApplication
public class WoainiApplication {

	@Bean
	public HessianProxyFactoryBean helloClient() {
		HessianProxyFactoryBean factory = new HessianProxyFactoryBean();
		factory.setServiceUrl("http://localhost:8080/HessianService");
		factory.setServiceInterface(HessianService.class);
		return factory;
	}

	public static void main(String[] args) {
		SpringApplication.run(WoainiApplication.class, args);
	}
}
